#ifndef __AAA建材批发苏总__
#define __AAA建材批发苏总__

#include <iostream>
#include <pthread.h>
#include <cstring>
#include <cstdio>
#include <unistd.h>
#include <vector>


//封装lock锁
class Mutex
{
public:
    Mutex(pthread_mutex_t* mutex)
    :mutex_(mutex)
    {
        Lock();
    }
    void Lock()
    {
        pthread_mutex_lock(mutex_);
    }

    void UnLock()
    {
        pthread_mutex_unlock(mutex_);
    }

    ~Mutex()
    {
        UnLock();
    }
private:
    pthread_mutex_t* mutex_;
};

#endif